package com.news.entity;

/**
 * @Author:weiming
 * @Date:2021/3/29
 * 分类实体
 */
public class Category {

    private Integer id;
    /**
     * 分类名称
     */
    private String name;
    /**
     * 一级分类为0，二级分类为父类id
     */
    private Integer parentId;
    /**
     * 是否删除
     */
    private Integer isDeleted;


    public Category(Integer id, String name, Integer parentId,Integer isDeleted) {
        this.id = id;
        this.name = name;
        this.parentId = parentId;
        this.isDeleted = isDeleted;
    }

    public Category() {
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Category{");
        sb.append("id=").append(id);
        sb.append(", name='").append(name).append('\'');
        sb.append(", parentId=").append(parentId);
        sb.append('}');
        return sb.toString();
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }
}
